package com.wish.wishfinance_management.controller;


import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wish.wishfinance_management.entity.TCwCheckBatch;
import com.wish.wishfinance_management.entity.TCwCheckBatchDetail;
import com.wish.wishfinance_management.service.ITCwCheckBatchDetailService;
import dto.financeDto.CwCheckBatchDetailResponseDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import vo.ResultEntity;

import java.util.List;

/**
 * <p>
 * 对账批次明细表（保存对账结果明细的表） 前端控制器
 * </p>
 *
 * @author fanzijun
 * @since 2021-04-08
 */
@RestController
@RequestMapping("/tCwCheckBatchDetail")
public class TCwCheckBatchDetailController {

    @Autowired
    ITCwCheckBatchDetailService itCwCheckBatchDetailService;

    @RequestMapping("list")
    public ResultEntity getList(CwCheckBatchDetailResponseDto cwCheckBatchDetailResponseDto){
        PageHelper.startPage(cwCheckBatchDetailResponseDto.getPageNum(),cwCheckBatchDetailResponseDto.getPageSize());

        List list =  itCwCheckBatchDetailService.getCheckBatchDetailList(cwCheckBatchDetailResponseDto);

        PageInfo<TCwCheckBatchDetail> pageInfo = new PageInfo<>(list);

        return ResultEntity.ok("200","查询成功",pageInfo);
    }

}

